﻿namespace CraftingCode.SymbolicCalculator
{
    public class AdditionTokenizationRule : TokenizationRule
    {
        private const char Symbol = '+';

        public override bool CanCreateNextTokenIn(string expression)
        {
            return expression[0] == Symbol;
        }

        public override Token CreateNextTokenIn(string expression)
        {
            return new Token()
                {
                    Node = new Addition(),
                    Priority = 2,
                    Value = Symbol.ToString()
                };
        }
    }
}